<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/upper_ftpprogram.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editformfields="editformfields"
               :editformoptions="editformoptions"
               :searchformfields="searchformfields"
               :searchformoptions="searchformoptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
     import extend from "@/extension/system/workbusiness/upper_ftpprogram.js";
    import { ref, defineComponent, getCurrentInstance } from "vue";
    export default defineComponent({
        setup(props, context) {
            const table = ref({
                key: 'ftp_program_id',
                footer: "foots",
                cnname: 'ftp加工中心详情',
                name: 'workbusiness/upper_ftpprogram',
                url: "/upper_ftpprogram/",
                sortname: "ftp_program_id"
            });
            const editformfields = ref({});
            const editformoptions = ref([]);
            const searchformfields = ref({});
            const searchformoptions = ref([]);
            const columns = ref([{field:'ftp_program_id',title:'主键',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ftpmachiningcenter_id',title:'ftp加工中心单外键',type:'int',width:110,hidden:true,readonly:true,align:'left'},
                       {field:'sequence',title:'序',type:'string',width:220,align:'left',sort:true},
                       {field:'program_name',title:'程序名称',type:'string',width:220,align:'left'},
                       {field:'tool_name',title:'刀具名称',type:'string',width:220,align:'left'},
                       {field:'knife_length',title:'刀具长度',type:'decimal',width:110,align:'left'},
                       {field:'blade_length',title:'刃长',type:'decimal',width:110,align:'left'},
                       {field:'category',title:'类型',type:'string',width:220,align:'left'},
                       {field:'rotate_speed',title:'转速',type:'decimal',width:110,align:'left'},
                       {field:'feed',title:'进给',type:'string',width:220,align:'left'},
                       {field:'side_bottom_margin',title:'侧/底余量',type:'string',width:220,align:'left'},
                       {field:'z_depth',title:'z深',type:'decimal',width:110,align:'left'},
                       {field:'remark',title:'注释',type:'string',width:220,align:'left'},
                       {field:'time',title:'时长',type:'string',width:220,align:'left'}]);
            const detail = ref({
                cnname: "#detailcnname",
                table: "#detailtable",
                columns: [],
                sortname: "",
                key: ""
            });

            const grid=ref(null);

            const updateSearchValue=(newValue)=>{
                grid.value.searchV=newValue;
                grid.value.search();
            };

            return {
                updateSearchValue,
                grid,
                table,
                extend,
                editformfields,
                editformoptions,
                searchformfields,
                searchformoptions,
                columns,
                detail,
            };
        },
    });
</script>
